// app/model/system_setting_model.js
'use strict';

module.exports = app => {
  const { STRING, TEXT } = app.Sequelize;

  const SystemSetting = app.model.define('system_setting', {
    key: {
      type: STRING(100),
      primaryKey: true,
      comment: '配置键'
    },
    value: {
      type: TEXT,
      allowNull: true,
      comment: '配置值'
    }
  }, {
    tableName: 'system_settings',
    underscored: true,
    comment: '系统设置表'
  });

  return SystemSetting;
};